
//统一颜色
function setUnifiedColor(index) {

    try {
        document.getElementById(index + "_1").value = document.getElementById(index + "_0").value;
        document.getElementById(index + "_2").value = document.getElementById(index + "_0").value;
        document.getElementById(index + "_1").style.backgroundColor = "#" + document.getElementById(index + "_0").value;
        document.getElementById(index + "_2").style.backgroundColor = "#" + document.getElementById(index + "_0").value;
    }
    catch (e) {
        alert(e)
    }
}

//拖拽方法
function allowDrop(el) {
    el.preventDefault();
}

function drag(el) {
    el.dataTransfer.setData("id", el.target.id);
    el.dataTransfer.setData("name", el.target.name);
}

function drop(el) {
    try {
        el.preventDefault();
        let name = el.dataTransfer.getData("name");

        _Model.add_grid(name);
    }
    catch (e) {
        alert(e);
    }
}

//关闭菜单栏
var closeToolBar = function () {

    $("#div_ToolBar").hide();
};

//打开菜单栏
var showToolBar = function () {
    try {

        $("#saved-data").val("");

        $("#div_ToolBar").show();
    }
    catch (e) {
        alert(e)
    }
};